/*
 *    Copyright (c) 2018-2025, cloud All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: cloud
 */

package com.fuyao.cloud.personnel.service;

import cn.hutool.core.lang.tree.Tree;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fuyao.cloud.common.core.util.R;
import com.fuyao.cloud.personnel.api.entity.Salary;
import org.springframework.validation.BindingResult;

import java.util.List;
import java.util.Map;

/**
 * 工资记录表
 *
 * @author 碎月
 * @date 2021-12-16 10:35:16
 */
public interface SalaryService extends IService<Salary> {

    /**
     * 导入工资数据
     * @param excelList 数据
     * @param bindingResult 返回错误或提示信息
     * @param yearMonth     yyyy-MM 年月
     * @return
     */
    R importSalary(List<Map<Integer, String>> excelList, BindingResult bindingResult, String yearMonth);

    /**
     * 群发短信
     * @param year 年
     * @param month 月
     * @return
     */
    R sendMassSms(Integer year, Integer month);

    /**
     * 发送工资提示短信短信
     * 根据用户编号发送
     * @param userNumbers 用户编号
     * @return
     */
    R sendUserNumbersSms(List<String> userNumbers, Integer year, Integer month);

    /**
     * 发送一条工资提示短信
     *
     * @param userNumber 用户编号
     * @return
     */
    R sendOneSms(String userNumber,Integer year, Integer month);

    /**
     * 根据工资信息，发送短信
     * @param salaryId 工资id
     * @return
     */
    R sendSalaryIdSms(List<Long> salaryId);

    /**
     * 年月树
     * @return
     */
    List<Tree<String>> selectTree();
}
